-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore(NODE-6939): update typescript to 5.8.3 #4526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small changes
beb0929
to
10bea61
Compare
src/cmap/wire_protocol/on_data.ts
Outdated
}, | ||
|
||
[Symbol.asyncDispose]: function (): PromiseLike<void> { | ||
return closeHandler().then(() => undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return closeHandler().then(() => undefined); | |
async [Symbol.asyncDispose]() { | |
await closeHandler(); |
a suggestion: nothing wrong with async syntax here I think, just a bit simpler to drop the return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also probably worth leaving a comment about how this shouldn't be used (I don't think it will but in case).
On older Node versions this is going to be:
{
throw() {/*...*/} // ...
async undefined() {
}
}
But typescript isn't going to let you know, ideally a test would fail on node 16 but might as well leave a paper trail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated for change and comment.
src/cmap/commands.ts
Outdated
@@ -730,10 +731,19 @@ const COMPRESSION_DETAILS_SIZE = 9; // originalOpcode + uncompressedSize, compre | |||
* An OP_COMPRESSED request wraps either an OP_QUERY or OP_MSG message. | |||
*/ | |||
export class OpCompressedRequest { | |||
private command: WriteProtocolMessageType; | |||
private options: { zLibCompressionLevel: number; agreedCompressor: CompressorName }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private options: { zLibCompressionLevel: number; agreedCompressor: CompressorName }; | |
private options: { zlibCompressionLevel: number; agreedCompressor: CompressorName }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
src/cmap/commands.ts
Outdated
) { | ||
this.command = command; | ||
this.options = { | ||
zLibCompressionLevel: options.zlibCompressionLevel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zLibCompressionLevel: options.zlibCompressionLevel, | |
zlibCompressionLevel: options.zlibCompressionLevel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there be some sort of test that catches this?
src/cmap/commands.ts
Outdated
agreedCompressor: this.options.agreedCompressor | ||
}, | ||
messageToBeCompressed | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); | |
const compressedMessage = await compress(this.options, messageToBeCompressed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Description
Updates typescript to 5.8.3
What is changing?
erasableSyntaxOnly
option.Is there new documentation needed for these changes?
None
What is the motivation for this change?
NODE-6939
Release Highlight
Fill in title or leave empty for no highlight
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript